package com.tsingteng.cosfun.ui.cosfun.imodel;


import com.tsingteng.cosfun.bean.BaseDataBean;
import com.tsingteng.cosfun.bean.FollowBean;
import com.tsingteng.cosfun.bean.ParagraphBean;
import com.tsingteng.cosfun.bean.PersonBean;
import com.tsingteng.cosfun.bean.PlayBean;
import com.tsingteng.cosfun.bean.PullBlackBean;
import com.tsingteng.cosfun.bean.VidePersonBean;
import com.tsingteng.cosfun.bean.WorkBean;
import com.tsingteng.cosfun.callback.RxObserver;
import com.tsingteng.cosfun.http.RxSchedulers;
import com.tsingteng.cosfun.mvp.module.BaseModel;


import retrofit2.Callback;

public class PersonWorkModel extends BaseModel implements IPersonWorkModel {


    @Override
    public void getParagraphList(long userId, String page_no, String page_size, Callback<BaseDataBean<PlayBean>> callback) {
        doRxRequest().getParagraph(userId, page_no, page_size).enqueue(callback);

    }

    @Override
    public void getParagraphLikeList(long userId, String page_no, String page_size, Callback<BaseDataBean<PlayBean>> callback) {
        doRxRequest().getParagraphLike(userId, page_no, page_size).enqueue(callback);

    }

    @Override
    public void getWorkList(long userId, String c, String showType, String page_no, String page_size, String deviceId, Callback<BaseDataBean<VidePersonBean>> callback) {
        doRxRequest().getWork(userId, c, showType, page_no, page_size, deviceId).enqueue(callback);
    }


    @Override
    public void getFollowNotification(String id, Callback<BaseDataBean<FollowBean>> callback) {
        doRxRequest().followPerson(id).enqueue(callback);
    }

    @Override
    public void getNoFollowNotification(String id, Callback<BaseDataBean<FollowBean>> callback) {
        doRxRequest().noFollow(id).enqueue(callback);
    }

    @Override
    public void getPraiseOrNot(String praise_type, String id, String type, Callback<BaseDataBean<Integer>> callback) {
        doRxRequest().getPraise(praise_type, id, type).enqueue(callback);
    }

    /**
     * 删除便当
     *
     * @param paragraph_id
     * @param callback
     */
    @Override
    public void getDelPlay(String paragraph_id, Callback<BaseDataBean<String>> callback) {
        doRxRequest().getDelePlay(paragraph_id).enqueue(callback);
    }

    /**
     * 添加不喜欢的段子
     *
     * @param paragraph_id
     * @param callback
     */
    @Override
    public void getAddNotLikePlay(String paragraph_id, Callback<BaseDataBean<String>> callback) {
        doRxRequest().getAddNoLikePlay(paragraph_id).enqueue(callback);
    }

    /**
     * 取消拉黑状态
     * @param user_id
     * @param workCallback
     */
    @Override
    public void getCancelPullBlackInfo(long user_id, Callback<PullBlackBean> workCallback) {
        doRxRequest().cancelPullBlack(user_id + "").enqueue(workCallback);
    }
}
